From 833e32fa081f98c3fcb011a0542eb05bc24ae19c Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 13 Mar 2008 00:26:20 +0000 Subject: [PATCH] Only auto-insert the prefix if we are at the end of the text Signed-off-by: Federico Mena Quintero svn path=/trunk/; revision=19799 --- gtk/gtkfilechooserentry.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 9b5f3dbdba..d07a53776d 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -558,8 +558,9 @@ check_completion_callback (GtkFileChooserEntry *chooser_entry) * the "open" modes. For "save" modes, the user must hit Tab to cause the prefix * to be inserted. That happens in gtk_file_chooser_entry_focus(). */ - if (chooser_entry->action == GTK_FILE_CHOOSER_ACTION_OPEN - || chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) + if ((chooser_entry->action == GTK_FILE_CHOOSER_ACTION_OPEN + || chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) + && gtk_editable_get_position (GTK_EDITABLE (chooser_entry)) == GTK_ENTRY (chooser_entry)->text_length) append_common_prefix (chooser_entry, TRUE); done: -- 2.30.2